package com.benben.springSecurity.config;

import com.benben.springSecurity.dao.IUserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserDetailService  {
//public class UserDetailService implements UserDetailsService {
    @Autowired
    IUserDao userDao;

//    @Override
//    public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {
//        List<User> list = userDao.findByName(s);
//        if(list != null){
//            return new org.springframework.security.core.userdetails.User(s,list.get(0).getPassword(), AuthorityUtils.commaSeparatedStringToAuthorityList("admin"));
//        }
//
//        return null;
//    }
}
